<template>
  <div id="supplierManagement" >
    <!--右上角按钮-->
    <div style='position:absolute;right:2%;top:10%;z-index: 99'>
      <div class='top_button_box'>
        <i style="margin-left:5px;color: white;font-size: 30px;opacity: 0.5;z-index: 98" @click="fullScreen" class="el-icon-full-screen"></i>
      </div>
    </div>


    <div id="entirety" style="background-image: url('/static/background/background.png');height:90vh">
      <div class='tab_row'>
        <el-radio-group v-model="supplierSelected" size="mini" @change='changeSupplier' style='margin-left:50px; margin-top: 3vh;'>
          <el-row :gutter='10'>
            <el-col :span='6' v-for='item in supplierList' :key="item.id"><el-radio-button :label="item.id">{{item.name}}</el-radio-button></el-col>
          </el-row>
        </el-radio-group>
      </div>
      <el-card class="cardTop">
        <div class="title_class" style='margin-top: -5px'>云供应商基础信息</div>

        <el-row>
          <el-col :span="8" :offset='3'>
            <el-card>
              <div class='card1'>
                  <div class="card1_inner_row">
                    <span class="card1_inner_num">主机数目：</span>
                    <span class="card1_inner_num" style="color:#87CEFA;">{{supplierInfoShow.hostNum }}</span>
                  </div>
                  <div class="card1_inner_row">
                    <span class="card1_inner_num">正常主机数目：</span>
                    <span class="card1_inner_num" style="color:#87CEFA;">{{supplierInfoShow.normalHostNum }}</span>
                  </div>
                  <div class="card1_inner_row">
                    <span class="card1_inner_num">异常主机数目：</span>
                    <span class="card1_inner_num" style="color:#87CEFA;">{{supplierInfoShow.abnormalHostNum}}</span>
                  </div>
              </div>
            </el-card>
          </el-col>
          <el-col :span="8" :offset='2'>
            <el-card>
              <div class='card1'>
                <div class="card1_inner_row">
                  <span class="card2_inner_num">计算信誉值:</span>
                  <span class="card2_inner_num" style="color:#87CEFA;">{{supplierInfoShow.computeCredenceValue }}</span>
                </div>
                <div class="card1_inner_row">
                  <span class="card2_inner_num">存储信誉值：</span>
                  <span class="card2_inner_num" style="color:#87CEFA;">{{supplierInfoShow.memoryCredenceValue }}</span>
                </div>
                <div class="card1_inner_row">
                  <span class="card2_inner_num">交易信誉值：</span>
                  <span class="card2_inner_num" style="color:#87CEFA;">{{supplierInfoShow.transactionCredenceValue}}</span>
                </div>
                <div class="card1_inner_row">
                  <span class="card1_inner_num">异常主机数目：</span>
                  <span class="card1_inner_num" style="color:#87CEFA;">{{supplierInfoShow.compreCredenceValue}}</span>
                </div>
              </div>
            </el-card>
          </el-col>
        </el-row>
      </el-card>
      <div class="title_class" style='margin-top: -5px;margin-left: 70px'>最新交易信息</div>
      <div style="height: 40vh" class='table_box'>
        <el-table
          :data="transactionInfoList"
          height="39vh"
          border
          style="width:100%">
          <el-table-column prop="userId" label="用户ID"  :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="supplierId" label="云商ID"  :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="transInfo" label="交易条目信息"  :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="transDate" label="交易时间"  :show-overflow-tooltip="true"></el-table-column>
          <el-table-column label="状态">
            <template slot-scope="scope">
              <el-tag
                :type="getStateText(scope.row.state).type"
                effect="dark">
                {{getStateText(scope.row.state).label}}
              </el-tag>
            </template>
          </el-table-column>
        </el-table>
      </div>

    </div>

  </div>
</template>

<script src='./js/index.js'>
</script>
<style lang="scss">
@font-face {
  font-family: 'Alternate';
  //src: url('../../assets/iconfont/Alternate.ttf');
  font-style: normal;
  font-width: normal;
}

@import './css/supplierManagement.scss';
</style>
